package com.lcy.attendance.user.mapper;

import java.util.List;


import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.lcy.attendance.user.entity.User;

public interface UserMapper {
	
	@Select("select password from user where username=#{username}")
	public String getUserPasswordByUsername(String username);

	@Select("select * from user where id=#{id}")
	public User getUserById(Integer id);
	
	@Select("select * from user")
	public List<User> getAllUsers();
	
	@Update("update user set password=#{password} where id=#{id}")
	public void updateUserPassword(@Param("id") int id, @Param("password") String password);
	
}
